var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var obdEngData = [];
obdEngData[0] = "1";
obdEngData[1] = "2";
obdEngData[2] = "3";
obdEngData[3] = "4";
obdEngData[4] = "5";
var obdAbsData = [];
obdAbsData[0] = "6";
obdAbsData[1] = "7";
obdAbsData[2] = "8";
obdAbsData[3] = "9";
obdAbsData[4] = "10";
var obdData = obdEngData.concat(obdAbsData);
var stopGet, num1 = 1, num8 = 1;
function startObd() {
    var eng = new EngineData();
    var abs = new AbsData();
    eng.dataAdd();
    eng.dataDiv();
    abs.dataAdd();
    abs.absDataMulti();
    stopGet = setTimeout("startObd()", 1000);
}
function stopObd() {
    clearTimeout(stopGet);
}
var CommonData = (function () {
    function CommonData() {
        this.num2 = 2;
        this.num3 = 3;
    }
    CommonData.prototype.dataSubtraction = function (num1) {
        // document.getElementById("count").value=this.num2+this.num3;
        // console.log(num1);
        if (num1) {
            num1 = this.num2 + this.num3;
            return num1;
        }
    };
    return CommonData;
}());
var EngineData = (function (_super) {
    __extends(EngineData, _super);
    function EngineData() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.num4 = 4;
        _this.num5 = 5;
        _this.num1 = 10;
        return _this;
    }
    EngineData.prototype.dataAdd = function () {
        //console.log(this.num4+this.num5);
    };
    EngineData.prototype.dataDiv = function () {
        var num10 = _super.prototype.dataSubtraction.call(this, num1);
        var num11 = 0;
        if (num10) {
            for (var i = 0; i < obdData.length; i++) {
                num11 = num11 + parseInt(obdData[i]);
                document.getElementById("count").value = num11;
            }
            console.log(num11);
            return num11;
        }
        //console.log(3);
    };
    return EngineData;
}(CommonData));
var AbsData = (function (_super) {
    __extends(AbsData, _super);
    function AbsData() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.num6 = 6;
        _this.num7 = 7;
        return _this;
    }
    //num1=20;
    AbsData.prototype.dataAdd = function () {
        //console.log(this.num6+this.num7);
    };
    AbsData.prototype.absDataMulti = function () {
        var num9 = _super.prototype.dataSubtraction.call(this, num1);
        // console.log(super.dataSubtraction(num1));
        //  console.log(num9);
    };
    return AbsData;
}(CommonData));
